/**
 *
 */
package com.ybkj.daijia.server.service.impl;

import com.ybkj.daijia.server.mapper.PayRecordDriverMapper;
import com.ybkj.daijia.server.model.PayRecordDriver;
import com.ybkj.daijia.server.service.PayRecordDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Shine
 */
@Service
public class DefaultPayRecordDriverService implements PayRecordDriverService {

    @Autowired
    private PayRecordDriverMapper payRecordDriverMapper;


    @Transactional(rollbackFor = Exception.class)
    public PayRecordDriver insertRecord(PayRecordDriver payRecordDriver) {

        payRecordDriverMapper.insertRecord(payRecordDriver);

        return payRecordDriver;
    }


    @Override
    public PayRecordDriver findByTradeNO(String out_trade_no) {

        return payRecordDriverMapper.selectByTradeNO(out_trade_no);
    }


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateByPrimaryKey(PayRecordDriver payRecordDriver) {

        return payRecordDriverMapper.updateByPrimaryKey(payRecordDriver);
    }


}

